const mongoose=require('mongoose');

const Person=mongoose.model('Person',new mongoose.Schema({
    name:String
}));

mongoose.connect('mongodb://localhost:27017/test');

new Person({name:1}).save((err,ret)=>{
    console.log('save:',err,ret);

    Person.find({},(err,ret)=>{
        console.log('find:',err,ret);
        process.exit();
    });

});